package com.water.camera.fragment;

import android.text.TextUtils;

import com.water.camera.bean.EditItem;

public class AddWord2Dlg extends AddWordDlg {

    @Override
    protected void save() {
        String title = binding.etTitle.getText().toString().trim();
        String desc = binding.etContent.getText().toString().trim();
        if (TextUtils.isEmpty(title)) {
            dismiss();
        } else {
            dismiss(true, new EditItem("", title, desc));
        }
    }

    @Override
    protected void delete() {
        dismiss(true, null);
    }
}
